﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfCustOrderRate.aspx.cs" Inherits="msBsc.WebUi.wfCustOrderRate" %>

<!DOCTYPE HTML>
<html>
<head id="Head1" runat="server"> 
    <title>评价</title> 
    <link rel="shortcut icon" href="/themes/Style1/Image/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/??themes/Style1/StyleQt.css,themes/Style1/cRateInd.css,jqPlugin/kindeditor/themes/default/default.css" /> 
<%--   <link rel="stylesheet" href="http://g.tbcdn.cn/tb/rate/0.2.6/pages/remark/page/index-min.css" />--%>

    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jBPage.js,themes/Style1/jsQt.js,jqPlugin/kindeditor/kindeditor.js,jqPlugin/kindeditor/lang/zh_CN.js"
        type="text/javascript"></script>
    <!--head fix rgn-->
    <script type="text/javascript">
        K = KindEditor;
//        K.DEBUG = true;
        K.basePath = K.options.basePath = '/jqPlugin/kindeditor/';
        K.options.themesPath = K.options.basePath + 'themes/';
        K.options.langPath = K.options.basePath + 'lang/';
        K.options.pluginsPath = K.options.basePath + 'plugins/';
//        function getfilequery() {
//            return "&ParentId=" + $("#txtCurrDirId").val()
//                                    + "&FileId=" + ""
//                                    + "&RelId=" + ""
//                                    + "&rType1=" + "1"
//                                    + "&rType2=" + "0";
//        };
        $(window).load(function () {
            var editor = K.editor({
                allowFileManager: true
            });

            $('.ks-simplestar img').live("mouseover", function () {
                !$(this).parent().hasClass("selected-rate") && $(this).attr("src", "/themes/Style1/Image/ratesel.png").prevAll().attr("src", "/themes/Style1/Image/ratesel.png");
            }).live("mouseout", function () {
                !$(this).parent().hasClass("selected-rate") && $(this).attr("src", "/themes/Style1/Image/ratenotsel.png").prevAll().attr("src", "/themes/Style1/Image/ratenotsel.png");
            }).live('click', function () {
                if ($(this).parent().hasClass("setview")) { return; }
                $(this).parent().removeClass("selected-rate").addClass("selected-rate").attr('rate-num', $(this).attr('rate-num'));
                $(this).attr("src", "/themes/Style1/Image/ratesel.png").prevAll().attr("src", "/themes/Style1/Image/ratesel.png");
                $(this).nextAll().attr("src", "/themes/Style1/Image/ratenotsel.png");
                $(this).parent().next().html('<strong>' + $(this).attr('rate-num') + '分</strong> - ' + $(this).attr('title'));
            });

            $('.upload-queue img').live('dblclick', function () {
                $(this).parent().remove();
            });
            $('.upload-btn').live('click', function () {
                editor.uploadJson = '/pgajax.axd?F_UPLOAD=1&blSave=0&COOKATHID=' + (typeof (cookesc) == "undefined" ? "" : cookesc)
                                    + "&fType=" + "image";
                //                                    + getfilequery();
                var $imgul = $(this).next();
                editor.loadPlugin('multiimage', function () {
                    editor.plugin.multiImageDialog({
                        onClose: function () {
                        }
                        , clickFn: function (urlList) {
                            if (urlList && urlList.length > 0) {
                                for (var i = 0; i < urlList.length; i++) {
                                    if ($imgul.find(" img").length < 5) {
                                        $imgul.append('<li><img alt="" src="' + urlList[i].url + '" for="' + urlList[i].url + '" style="width:45px;height:40px;"></li>');
                                    }
                                }
                            }
                            editor.hideDialog();
                        }
                    });
                });
            });
            $(".submit-btn").click(function () {
                dosaverate();
            });


            $(".tm-m-photos-thumb li").live("click", function () {
                var $self = $(this);
                if ($self.hasClass("tm-current")) {
                    $self.parent().next().hide();
                    $self.removeClass("tm-current");
                } else {
                    $self.parent().next().show('fast');
                    $self.addClass("tm-current");
                    $self.prevAll().removeClass("tm-current");
                    $self.nextAll().removeClass("tm-current");
                    $self.parent().next().find(" img").attr("src", $self.find(" img").attr("src"));
                    var htem3 = $self.parent().next().find(" img").height();
                    var wtem3 = $self.parent().next().find(" img").width();
                    if (parseInt(htem3.toString().replace('px', '')) < 250) {
                        $self.parent().next().height(htem3);
                    } else {
                        $self.parent().next().height("250px");
                    }
                    if (parseInt(wtem3.toString().replace('px', '')) < 250) {
                        $self.parent().next().width(wtem3);
                    } else {
                        $self.parent().next().width("250px");
                    }
                }
            });
        });

        function setsimplestar(scid, snum) {
            var $imgtem1 = $("#" + scid + " img[rate-num='" + snum + "']");
            $imgtem1.attr("src", "/themes/Style1/Image/ratesel.png").prevAll().attr("src", "/themes/Style1/Image/ratesel.png");
            $imgtem1.parent().next().html('<strong>' + $imgtem1.attr('rate-num') + '分</strong> - ' + $imgtem1.attr('title'));
        };

        function dosaverate() { 
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", "dosaverate");
            _jsParam.AddCell("ID", $("#txtId").val());
            var i = 0;
            var blRateSel = true;
            $(".rate-box").each(function () {
                _jsParam.AddCell("ORDER_LIST_ID_" + i, $(this).attr('data-id'));
                var chkratenum = $(this).find('input:radio:checked').val();
                if (chkratenum != null && chkratenum != undefined) {
                    _jsParam.AddCell("BUYER_RATE_NUM_" + i, chkratenum);
                } else {
                    alert("请选择评价！");
                    blRateSel = false;
                    return;
                }
                _jsParam.AddCell("BUYER_RATE_DESC1_" + i, $(this).find(" textarea").val());
                var r = 0;
                $(this).find('.upload-queue img').each(function () {
                    _jsParam.AddCell("GOODS_IMG_URL_" + i + "_" + r, $(this).attr("for"));
                    r++;
                });
                i++;
            });
            if (!blRateSel) {
                return;
            } 
            blRateSel = false;
            $('#liDESC_MATCH_RATE .selected-rate').each(function () {
                _jsParam.AddCell("DESC_MATCH_RATE", $(this).attr('rate-num'));
                blRateSel = true;
            });
            if (!blRateSel) {
                alert("请给宝贝与描述相符打分！");return;
            } 
            blRateSel = false;
            $('#liSERVICE_RATE .selected-rate').each(function () {
                _jsParam.AddCell("SERVICE_RATE", $(this).attr('rate-num'));
                blRateSel = true;
            });
            if (!blRateSel) {
                alert("请给卖家的服务态度打分！"); return;
            }
            blRateSel = false;
            $('#liSEND_SPEED .selected-rate').each(function () {
                _jsParam.AddCell("SEND_SPEED", $(this).attr('rate-num'));
                blRateSel = true;
            });
            if (!blRateSel) {
                alert("请给卖家发货的速度打分！"); return;
            }

            ajaxComm(_jsParam);

        };
    </script> 
</head>
<body>
    <div id="mallPage" class="tms-page mallAct tmall-  page-not-market">
        <!-- -->
        <!--商城通用顶通-->
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderTopHtml()%> 
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetHeaderLogoHtml()%> 
        <div id="content" style="width:990px;">
            <div class="line top-line clearfix rate-item">
                <h3 class="top-line-title ">
                    <span class="page-title">评价宝贝</span>
                </h3>
                <ul class="header-nav">
                    <%=GetHeaderNav()%>
                </ul>
            </div>
 
  
<!--评价 START-->
<div class="line rate">
    <form id="rateListForm" class="remark-form">
    <div class="itemlist">
        <fieldset>
        

            <ul class="rate-list">
            <%=GetRateList() %>
               <%-- <li data-id="823693262473496" class="rate-box"> 
                    <div class="item-rate-info">
                        <div class="item-detail">
                            <a href="http://trade.taobao.com/trade/detail/trade_snap.htm?trade_id=823693262473496"
                                target="_blank" class="item-d-img">
                                <img src="http://img02.taobaocdn.com/bao/uploaded/i2/T1mIMaFxRXXXXXXXXX_!!0-item_pic.jpg_130x130.jpg">
                            </a>
                            <div class="item-title">
                                <a href="http://trade.taobao.com/trade/detail/trade_snap.htm?trade_id=823693262473496"
                                    target="_blank" title="3M双面胶 粘灰膜 翘机三角片 十字螺丝刀">3M双面胶 粘灰膜 翘机三角片 十字螺丝刀</a>
                            </div>
                        </div>
                    </div>
                    <div class="item-rate-main">
                        <div class="item-rate-act">
                            <div class="rate-control">
                                <ul>
                                    <li class="good">
                                        <label for="rate-good-823693262473496">
                                            <input id="rate-good-823693262473496" name="rates823693262473496" type="radio" value="1"
                                                class="good-rate">
                                            <i class="icon icon-rank icon-good"></i><span class="label-hidden">好评</span>
                                        </label>
                                        <span class="rate-score rate-score-good">卖家
                                            <br>
                                            +1分</span> </li>
                                    <li class="normal">
                                        <label for="rate-normal-823693262473496">
                                            <input id="rate-normal-823693262473496" name="rates823693262473496" type="radio"
                                                value="0" class="noraml-rate">
                                            <i class="icon icon-rank icon-normal"></i><span class="label-hidden">中评</span>
                                        </label>
                                        <span class="rate-score rate-score-normal">卖家
                                            <br>
                                            不加分</span> </li>
                                    <li class="bad">
                                        <label for="rate-bad-823693262473496">
                                            <input id="rate-bad-823693262473496" name="rates823693262473496" type="radio" value="-1"
                                                class="bad-rate">
                                            <i class="icon icon-rank icon-bad"></i><span class="label-hidden">差评</span>
                                        </label>
                                        <span class="rate-score rate-score-bad">卖家
                                            <br>
                                            -1分</span> </li>
                                </ul>
                            </div>
                        </div>
                        <div class="rate-msg-box">
                            <div class="bd">
                                <div class="textinput">
                                    <textarea name="rateContents823693262473496" maxlength="" 
                                        class="rate-msg"></textarea>
                                    <div class="text-counter">
                                        <strong class="r-t-counter">500</strong>字</div>
                                </div>
                            </div>
                            <div class="ft">
                                <div class="share-box"> 
                                </div>
                                <div class="photo-uploader">
                                    <a class="upload-btn btn-chrome"  >
                                        <i class="icon-img-upload"></i>晒照片<div class="file-input-wrapper" style="overflow: hidden;">
                                            </div>
                                        </a> 
                                    <ul class="upload-queue">
                                    </ul>
                                    <span class="upload-msg">限5张</span>
                                </div>
                            </div>
                        </div> 
                    </div>
                </li>
--%>
<%--
                <li data-id="823693262483496" class="rate-box rate-box-last" data-prompt="亲，你对本次购物满意么？写点什么与大家分享吧。">
                    <div>
                        <input type="hidden" name="bizOrderIds" value="823693262483496">
                        <input type="hidden" name="auctionId823693262483496" value="35518475475">
                        <input type="hidden" name="auctionPictUrl823693262483496" value="i2/14340029313674003/T1vBfVFndaXXXXXXXX_!!0-item_pic.jpg">
                        <input type="hidden" name="auctionSku823693262483496" value="颜色分类:328D原装一体屏幕">
                        <input type="hidden" name="prompt823693262483496" value="亲，你对本次购物满意么？写点什么与大家分享吧。">
                        <input type="hidden" name="giftEventId823693262483496" value="0">
                        <input type="hidden" name="giftDesp823693262483496" value="">
                        <input type="hidden" name="canUploadPic823693262483496" value="true">
                        <input type="hidden" name="leafCatId823693262483496" value="50010614">
                        <input type="hidden" name="rootCatId823693262483496" value="50008090">
                        <input type="hidden" name="auctionPrice823693262483496" value="92.0">
                        <input type="hidden" name="auctionTitle823693262483496" value="HTC T328T/W/D t327d/w/t T329w/d/t 总成 原装触摸屏 显示屏幕">
                        <input type="hidden" name="fwShare823693262483496" value="false">
                        <input type="hidden" name="serviceInfos823693262483496" value="">
                        <input type="hidden" name="hiddenGoodNormalBad823693262483496" value="false">
                        <input type="hidden" name="isTaoModouOrder823693262483496" value="false">
                    </div>
                    <div class="item-rate-info" data-spm="1000328">
                        <div class="item-detail">
                            <a href="http://trade.taobao.com/trade/detail/trade_snap.htm?trade_id=823693262483496"
                                target="_blank" class="item-d-img">
                                <img src="http://img02.taobaocdn.com/bao/uploaded/i2/14340029313674003/T1vBfVFndaXXXXXXXX_!!0-item_pic.jpg_130x130.jpg">
                            </a>
                            <div class="item-title">
                                <a href="http://trade.taobao.com/trade/detail/trade_snap.htm?trade_id=823693262483496"
                                    target="_blank" title="HTC T328T/W/D t327d/w/t T329w/d/t 总成 原装触摸屏 显示屏幕">HTC T328T/W/D
                                    t327d/w/t T329w/d/t 总成 原装触摸屏 显示屏幕</a>
                            </div>
                            <div class="sku">
                                颜色分类:328D原装一体屏幕
                            </div>
                        </div>
                    </div>
                    <div class="item-rate-main">
                        <div class="item-rate-act">
                            <div class="rate-control">
                                <ul>
                                    <li class="good">
                                        <label for="rate-good-823693262483496">
                                            <input id="rate-good-823693262483496" name="rates823693262483496" type="radio" value="1"
                                                class="good-rate">
                                            <i class="icon icon-rank icon-good"></i><span class="label-hidden">好评</span>
                                        </label>
                                        <span class="rate-score rate-score-good">卖家
                                            <br>
                                            +1分</span> </li>
                                    <li class="normal">
                                        <label for="rate-normal-823693262483496">
                                            <input id="rate-normal-823693262483496" name="rates823693262483496" type="radio"
                                                value="0" class="noraml-rate">
                                            <i class="icon icon-rank icon-normal"></i><span class="label-hidden">中评</span>
                                        </label>
                                        <span class="rate-score rate-score-normal">卖家
                                            <br>
                                            不加分</span> </li>
                                    <li class="bad">
                                        <label for="rate-bad-823693262483496">
                                            <input id="rate-bad-823693262483496" name="rates823693262483496" type="radio" value="-1"
                                                class="bad-rate">
                                            <i class="icon icon-rank icon-bad"></i><span class="label-hidden">差评</span>
                                        </label>
                                        <span class="rate-score rate-score-bad">卖家
                                            <br>
                                            -1分</span> </li>
                                </ul>
                            </div>
                        </div>
                        <div class="rate-msg-box">
                            <div class="bd">
                                <div class="textinput">
                                    <span class="ph-label">亲，你对本次购物满意么？写点什么与大家分享吧。</span>
                                    <textarea name="rateContents823693262483496" maxlength="" aria-labelby="label-ti-823693262483496"
                                        class="rate-msg"></textarea>
                                    <div class="text-counter">
                                        <strong class="r-t-counter">500</strong>字</div>
                                </div>
                            </div>
                            <div class="ft">
                                <div class="share-box">
                                    <input type="hidden" name="forceAnnoy823693262483496" value="false">
                                    <label for="privacy-radio-public-823693262483496" class="checked">
                                        <input type="radio" id="privacy-radio-public-823693262483496" class="mod-tips privacy-control"
                                            checked="" data-tip-name="privacy-control-public" name="anony823693262483496"
                                            value="0">
                                        公开
                                    </label>
                                    <label for="privacy-radio-anony-823693262483496">
                                        <input type="radio" id="privacy-radio-anony-823693262483496" class="mod-tips privacy-control"
                                            data-tip-name="privacy-control-anony" name="anony823693262483496" value="1">
                                        匿名</label>
                                </div>
                                <div class="photo-uploader">
                                    <a class="upload-btn btn-chrome" data-auth="{&quot;max&quot;:[5,&quot;最多允许上传五张图片！&quot;],&quot;maxSize&quot;:[5000, &quot;文件大小为{size}，文件太大！&quot;],&quot;allowExts&quot;:[{&quot;desc&quot;:&quot;JPG,JPEG,PNG,GIF,BMP&quot;, &quot;ext&quot;:&quot;*.jpg;*.jpeg;*.png;*.gif;*.bmp&quot;},&quot;文件格式错误！&quot;]}">
                                        <i class="icon-img-upload"></i>晒照片<div class="file-input-wrapper" style="overflow: hidden;">
                                            <input type="file" name="picture" hidefocus="true" class="file-input"></div>
                                        <input type="hidden" id="pictures823693262483496" name="pictures823693262483496"
                                            value=""></a> <a class="upload-btn upload-btn-mobile J_MobileUpload" href="#" data-token="rateToken20130606"
                                                data-max="5">手机晒图</a>
                                    <ul class="upload-queue">
                                    </ul>
                                    <span class="upload-msg">限5张</span>
                                    <script type="text/uploader-restore" id="J_ImageUploaderRestore_823693262483496">
                                            [
                                                                                            ]
                                    </script>
                                    <!--
																						-->
                                </div>
                            </div>
                        </div>
                        <div class="share-selector">
                            <span class="sns-site-holder">
                                <div class="sns-share-app">
                                    <input type="checkbox" class="J_SycMB"><span class="title">分享到：</span><label class="J_Sapp J_JiangHuIcon J_Bounded disable "
                                        data-id="0" data-url="" data-name="淘宝网" data-sign="jianghu"><i class="i-jianghu"></i></label><label
                                            class="J_Sapp    J_BoundApp disable " data-id="4" data-url="http://member1.taobao.com/member/fresh/weibo_bind_management.htm?theme=page&amp;from=sns"
                                            data-name="新浪微博" data-sign="sina"><i class="i-sina"></i></label><label class="J_Sapp    J_BoundApp disable "
                                                data-id="3" data-url="http://t.taobao.com/cooperate/connect/connect_renren.htm"
                                                data-name="人人网" data-sign="renren"><i class="i-renren"></i></label><label class="J_Sapp    J_BoundApp disable "
                                                    data-id="5" data-url="http://t.taobao.com/cooperate/connect/connect_sohu.htm"
                                                    data-name="搜狐微博" data-sign="sohu"><i class="i-sohu"></i></label><label class="J_Sapp    J_BoundApp disable "
                                                        data-id="11" data-url="http://t.taobao.com/cooperate/connect/connect_douban.htm"
                                                        data-name="豆瓣" data-sign="douban"><i class="i-douban"></i></label></div>
                                <input class="J_SiteInfo" type="hidden" name="share-sites-823693262483496" value="[]"></span>
                            <a class="sns-setting" href="http://t.taobao.com/cooperate/connect/connect_manager.htm">
                                设置</a>
                        </div>
                    </div>
                </li>--%>
            </ul>
        </fieldset>
        <fieldset>
            <div class="dsr-box">
                <h2 class="dsr-title">
                    <span>店铺动态评分</span> <b class="arrow-right"></b><b class="arrow-right arrow-right-top">
                    </b>
                </h2>
                <ul class="stars">
                <%=GetShopSvcLi()%>
                </ul>
            </div>
        </fieldset>
    </div>
    <div class="submitbox">
        <button type="button" class="submit submit-btn" style="display:none;">
            提交评论</button>
    </div>
    </form>
</div>
<!--评价 END-->
   
				
			</div>
        <%=new msBsc.WebUi.Code.QtHtmlGet().GetFloorHtml()%>
    </div>
    <input type="hidden" id="txtId" value="">
    <!-- foot script -->
</body>
</html>
 